{config_load file='site.conf' section='category'}
{include file='header.tpl'}
{literal}
 <SCRIPT LANGUAGE="JavaScript">
 <!--
 function langSwitch(langId){
	location.href="category.php?lang_id="+langId;
 }
 //-->
 </SCRIPT>
{/literal}
<div id="bg">
 		<table width="100%">
			<tr>
				<td ></td> 
				<td width="80px">言語選択</td>
				<td width="50px">{html_options name=lang_id options=$langList selected=$smarty.get.lang_id|default:1 OnChange="langSwitch(this.options[this. selectedIndex].value)"}
				</td>
			</tr>
			{if $msg ne ""}<tr><td colspan="3"><div class="errorMsg">{$msg}</div></td></tr>{/if}
		</table>
	<div class="post" style="float:left;width:500px;" id="keyWordView">
		<h2 class="title">カテゴリ・タグ一覧:</h2>
	　　<a href="javascript:ddtreemenu.flatten('keywordTree', 'expand')">すべてを展開</a> | <a href="javascript:ddtreemenu.flatten('keywordTree', 'contact')">すべてを折りたたみ</a>
		<ul id="keywordTree" class="treeview">
		{$html_str}
		</ul>
		<script type="text/javascript">
			ddtreemenu.createTree("keywordTree", false)
		</script>
	</div>
	<div class="post" id="keyWordEdit" style="float:left;" >
			<h2 class="title">カテゴリ追加</h2>
			<form name="catEdit" id="catEdit" method="post" class="editor">
			<input type="hidden" name="actionType" id="actionType" value="catEdit"/>
			 <table width="500px" id="tb_form">
			   <tr>  
				 <th width="150px">親カテゴリ</th>
				 <td ><select name="pid" id="pid" >
					 <option value="0">根カテゴリ</option> 
					 {foreach from=$addCatList item=cat}
    					<option value={$cat.catId}>
						{if $cat.pcatName == '' }
							{$cat.catName}
						{else}
							({$cat.pcatName}){$cat.catName}
						{/if}
					  	</option>
					 {/foreach}
				   </select>
				 </td>
			   </tr>
			   <tr>  
				 <th>カテゴリ名</th>
				 <td> <textarea  name="category_name" id="category_name" rows="4" cols="40" ></textarea><br />※複数タグを一括に登録する場合、改行してください。</td>
			   </tr>
			     <tr>  
				 <th >アダルトフラグ</th>
				 <td >
					はい<input type="radio" name="adult_flg" id="adult_flg" value="0" >
					いいえ<input type="radio" name="adult_flg" id="adult_flg" value="1" checked="checked" >
				 </td>
			   </tr>
			   <tr>  
				 <td  colspan="2" align="center"><input type="submit" name="cmd" value="カテゴリ追加" class="submitButton"></td>
				  
			   </tr>
			 </table>
			</form>
			<h2 class="title">タグ追加・カテゴリ削除</h2>
	
			<form name="keywordEdit" id="keywordEdit" method="post" class="editor">
			<input type="hidden" name="actionType" id="actionType" value="keywordEdit"/>
			 <table width="500px" id="tb_form">
			   <tr>  
				 <th width="150px">親カテゴリ</th>
				 <td ><select name="category_id" id="category_id" > 
					 {foreach from=$addCatList item=cat}
    					<option value={$cat.catId}>
						{if $cat.pcatName == '' }
							{$cat.catName}
						{else}
							({$cat.pcatName}){$cat.catName}
						{/if}
					  	</option>
					 {/foreach}
				   </select>
				 </td>
			   </tr>
			   <tr>  
				 <th >タグ情報</th>
				 <td> <textarea  name="keyword_name" id="keyword_name" rows="4" cols="40" ></textarea><br />※複数タグを一括に登録する場合、改行してください。</td>
			   </tr>
			   <tr>  
				 <td align="center" colspan="2">
				 <input type="submit" name="cmd" value="タグ追加"   class="submitButton">
			  	 <input type="submit" name="cmd" value="親カテゴリ削除"   class="submitButton" ></td>
			   </tr>
			 </table>
			</form>	
			<h2 class="title">タグ削除</h2>
			
			<form name="keywordDel" id="keywordDel" method="post" class="editor">
			<input type="hidden" name="actionType" id="actionType" value="keywordDel"/>
			 <table width="500px" id="tb_form">
			   <tr>  
				 <th width="150px">タグID</th>
				 <td >
				 	<input type="text" name="tag_id" id="tag_id" />
				 </td>
			   </tr>
			   <tr>  
				 <td align="center" colspan="2">
				 	<input type="submit" name="cmd" value="タグ削除" class="submitButton" >
				 </td>
			   </tr>
			 </table>
			</form>

		</div>
</div>

{include file='footer.tpl'}



